package com.example.javawebdemo.command;

import jakarta.servlet.ServletException;
import jakarta.servlet.http.*;

import java.io.IOException;

public class ListCommand implements ProductCommand {
    @Override
    public void execute(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        // 获取所有产品列表
        // List<Product> products = productService.getAll();
        // request.setAttribute("products", products);
        request.getRequestDispatcher("product_list.jsp")
                .forward(request, response);
    }
}